<?php

/**
 * A form to import an OPML xml file
 * @author panosbaroudjian
 *
 */
class Application_Form_ImportOpml extends Zend_Form
{

    public function init()
    {
        $this->setMethod('post');
        //TODO: Custom error messages
        $file = new Zend_Form_Element_File('opml');
        $file->setLabel('');
        $file->addValidator('Count', false, 1);
        $file->addValidator('Size', false, 102400);
        $file->addValidator('Extension', false, 'xml');
        $this->addElement($file);
        $this->addElement('submit', 'importSubmit', array('ignore' => true, 'label' => 'Import your feeds'));
    }
}

